@echo off
set CurrentPath=%~dp0
set P1Path=
:begin
for /f "tokens=1,* delims=\" %%i in ("%CurrentPath%") do (set content=%%i&&set CurrentPath=%%j)
if "%P1Path%%content%\" == "%~dp0" goto end
set P1Path=%P1Path%%content%\
goto begin
:end
For /f "tokens=1-3 delims=: skip=1 eol=#" %%i in (%P1Path%JM_config) do (echo %%i %%j
scp -P 22 -r %P1Path%jmeter_properties\*1.properties Administrator@%%i:/C:/Users/Administrator/jmeterEnv/jmeter/apache-jmeter-5.1.1/bin
ssh administrator@%%i "cd C:/Users/Administrator/jmeterEnv/jmeter/apache-jmeter-5.1.1/bin && move /y jmeter_Master_1.properties jmeter.properties && move /y user_1.properties user.properties && move /y jmeter_1.bat jmeter.bat && move /y jmeter-server_1.bat jmeter-server.bat"

)




pause
